/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package sn.gandal.mobile.kalpet.persistence;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 * @version V 1.0 01/03/2010
 * @author SOWDIOMYERO
 */
@Entity
@Table(name = "generateur_code_client", catalog = "kmobile", schema = "")
@NamedQueries({
    @NamedQuery(name = "GenerateurCodeClient.findAll", query = "SELECT g FROM GenerateurCodeClient g"),
    @NamedQuery(name = "GenerateurCodeClient.findById", query = "SELECT g FROM GenerateurCodeClient g WHERE g.id = :id"),
    @NamedQuery(name = "GenerateurCodeClient.findByNumeroClient", query = "SELECT g FROM GenerateurCodeClient g WHERE g.numeroClient = :numeroClient"),
    @NamedQuery(name = "GenerateurCodeClient.findByCodeSecret", query = "SELECT g FROM GenerateurCodeClient g WHERE g.codeSecret = :codeSecret")})
public class GenerateurCodeClient implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "id", nullable = false)
    private Integer id;
    @Basic(optional = false)
    @Column(name = "numeroClient", nullable = false)
    private int numeroClient;
    @Basic(optional = false)
    @Column(name = "codeSecret", nullable = false)
    private int codeSecret;

    public GenerateurCodeClient() {
    }

    public GenerateurCodeClient(Integer id) {
        this.id = id;
    }

    public GenerateurCodeClient(Integer id, int numeroClient, int codeSecret) {
        this.id = id;
        this.numeroClient = numeroClient;
        this.codeSecret = codeSecret;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public int getNumeroClient() {
        return numeroClient;
    }

    public void setNumeroClient(int numeroClient) {
        this.numeroClient = numeroClient;
    }

    public int getCodeSecret() {
        return codeSecret;
    }

    public void setCodeSecret(int codeSecret) {
        this.codeSecret = codeSecret;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof GenerateurCodeClient)) {
            return false;
        }
        GenerateurCodeClient other = (GenerateurCodeClient) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "sn.gandal.mobile.kalpet.persistence.GenerateurCodeClient[id=" + id + "]";
    }

}
